import {createRouter,createWebHistory} from 'vue-router'



let  routes=[
   {
      path:"/",
      redirect:"/login"
   },
   {//项目主页
      path:"/layout",
      component:()=>import("@/views/layout/index.vue"),
      name:"layout",
      children:[
         {
             path:"/",
             redirect:"artcate"
         },
         { //文章分类
            path:"artcate",
            name:"artcate",
            component:()=>import("@/views/articleCate/index.vue")
         },
         { //文章管理
            path:"artlist",
            name:"artlist",
            component:()=>import("@/views/articleList/index.vue")
         },
           { //基本资料
            path:"baseuser",
            name:"baseuser",
            component:()=>import("@/views/baseUser/index.vue")
         },
           { //修改头像
            path:"useravator",
            name:"useravator",
            component:()=>import("@/views/userAvator/index.vue")
         },
          { //修改密码
            path:"editpass",
            name:"editpass",
            component:()=>import("@/views/editPassword/index.vue")
         }
      ]
    },
    {  //登录页
      path:"/login",
      name:"/login",
      component:()=>import("@/views/login/index.vue")
    },
      {  //数据统计页面
      path:"/tong",
      name:"tong",
      component:()=>import("@/views/tongJi/index.vue")
    },
       {  //数据统计页面
      path:"/tou",
      name:"tou",
      component:()=>import("@/views/tongJi/tou.vue")
    },
     {  //大屏
      path:"/shunfeng",
      name:"shunfeng",
      component:()=>import("@/views/bigScreen/index.vue")
    },
     {  //大屏
      path:"/dragg",
      name:"dragg",
      component:()=>import("@/views/Dragg/index.vue")
    },
    ,
     {  //大屏
      path:"/three",
      name:"three",
      component:()=>import("@/views/Three/index.vue")
    }
   
   
 ]

let router=createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   routes:routes
})



export default router
